home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / html / vendors / adobe / software / Removeill2.csh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1997-06-17  |  2KB  |  79 lines

  1. #! /bin/csh -f
  2. #
  3. set DFTTOPDIR=/usr/adobe/Illustrator_5.5
  4. set PNAME=Illustrator_5.5
  5.  
  6. umask 022
  7.  
  8. # Abort installation if user not superuser
  9. if (`whoami` != root) then
  10.     echo
  11.     echo "You must be logged in as root to install $PNAME."
  12.     echo "Type su and enter the password to become root."
  13.     goto ABORT
  14. endif
  15.  
  16. BEGIN_SCRIPT:
  17. /usr/bsd/clear
  18.  
  19. REMOVEAI:
  20. echo
  21. echo "*** Remove an installation of $PNAME ***"
  22.  
  23. echo ""
  24. echo "Enter the Installation directory into which you"
  25. echo "installed Adobe Illustrator"
  26. echo -n "[press Enter for /usr/adobe]: "
  27. set A = $<
  28. if ( "$A" == ""  ) then
  29.     set TOPDIR="$DFTTOPDIR"
  30.     set OTHERDIR=/usr/adobe
  31. else
  32.     set TOPDIR="${A}/Illustrator_5.5"
  33.     set OTHERDIR="${A}"
  34. endif
  35.  
  36. # Check if installation directory exists
  37. if ( ! -e $TOPDIR ) then
  38.     echo
  39.     echo "$TOPDIR does not exist."
  40.     goto ABORT
  41. endif
  42.  
  43. echo
  44. echo -n "Removing $TOPDIR ..."
  45. /bin/rm -rf $TOPDIR 
  46. if ( "$TOPDIR" == "$DFTTOPDIR") then
  47.     rmdir /usr/adobe
  48. endif
  49. echo "done"
  50. if ( -d "$OTHERDIR/DPSNXBasic_2.1.1" ) then
  51. echo -n "Remove directory $OTHERDIR/DPSNXBasic_2.1.1 (y/n)? \c"
  52.     set ans=($<)
  53.         if ( $ans != 'y' ) then
  54.     else
  55.     /bin/rm -rf $OTHERDIR/DPSNXBasic_2.1.1
  56.     echo done.
  57.     endif
  58. endif
  59.  
  60. if ( -l /usr/bin/illustrator ) then
  61. echo -n "Remove link /usr/bin/illustrator (y/n)? \c"
  62. set ans=($<)
  63.         if ( $ans != 'y' ) then
  64.             echo " "
  65.                 echo " "
  66.                 echo "... Bye."
  67.                 sleep 3
  68.                 exit
  69.     else
  70.     /bin/rm -f /usr/bin/illustrator
  71.     endif
  72. endif
  73. echo "done"
  74. sleep 10
  75. exit 0
  76.  
  77. ABORT:
  78. exit 1
  79.